<template>
  <div>
    <div class="ribbon" v-if="managementInfo['display-ribbon-on-profiles']=='dev'">
      <a>
        <span>Development</span>
      </a>
    </div>
    <div>
      <frame-header></frame-header>
      <frame-aside></frame-aside>
    </div>
    <div>
      <frame-content></frame-content>
    </div>
  </div>
</template>

<script>
import frameHeader from "./frame-header.vue";
import frameAside from "./frame-aside.vue";
import frameContent from "./frame-content.vue";

export default {
  data() {
    return {
      managementInfo: {}
    };
  },
  components: {
    frameHeader,
    frameAside,
    frameContent
  },
  created() {
    this.$http({
      url: "/management/info",
      method: "GET"
    }).then(resp => {
      this.managementInfo = resp.data;
    });
  }
};
</script>

<style scoped>
.ribbon {
  background-color: rgba(170, 0, 0, 0.5);
  right: -40px;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  overflow: hidden;
  position: fixed;
  bottom: 30px;
  white-space: nowrap;
  width: 15em;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.75;
}
.ribbon a {
  color: #fff;
  display: block;
  font-weight: 400;
  margin: 1px 0;
  padding: 10px 50px;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 0 5px #444;
  pointer-events: none;
}
</style>